//
//  CoreDataHelper.h
//  KoolearnCET
//
//  Created by 崔宝印 on 2016/11/8.
//  Copyright © 2016年 Koolearn. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import "CreditCard+CoreDataClass.h"


typedef NS_ENUM (NSUInteger, VideoPackageType)
{
    VideoPackageTypeFree = 0, //免费视频列表
    VideoPackageTypePaied = 1,   //付费自学包视频列表
};

@interface CoreDataHelper : NSObject
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;

+ (CoreDataHelper *)sharedInstance;

- (void)saveContext;
- (NSArray *)fetchEntityWith:(NSString *)entityName predicate:(NSPredicate *)predicate relationship:(NSArray *)relationshipKeys;
- (NSArray *)fetchEntityWith:(NSString *)entityName;


@end
